package com.bling.common.bean;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
/**
 * 用户站内信
 **/
@Entity
@Table(name="T_SITEMSG")
public class SiteMsg implements Serializable {

	private static final long serialVersionUID = 5861252611506503108L;

	private Integer id;//主键编号
	private Integer fromuserbasicid;//来自用户主键
	private Integer touserbasicid;//收用户主键
	private String content;//内容
	private boolean isreaded;//是否已读 0 未读 1 已读
	private String time;//发送时间
	private Integer messagebasicid;//站内信所属主键
	
	public SiteMsg() {
		super();
	}
	public SiteMsg(Integer fromuserbasicid, Integer touserbasicid,
			String content, boolean isreaded, String time,
			Integer messagebasicid) {
		super();
		this.fromuserbasicid = fromuserbasicid;
		this.touserbasicid = touserbasicid;
		this.content = content;
		this.isreaded = isreaded;
		this.time = time;
		this.messagebasicid = messagebasicid;
	}
	
	@Id
	@GeneratedValue
	@Column
	public Integer getId() {
		return id;
	}
	public void setId(Integer id) {
		this.id = id;
	}
	
	@Column
	public Integer getFromuserbasicid() {
		return fromuserbasicid;
	}
	public void setFromuserbasicid(Integer fromuserbasicid) {
		this.fromuserbasicid = fromuserbasicid;
	}
	
	@Column
	public Integer getTouserbasicid() {
		return touserbasicid;
	}
	public void setTouserbasicid(Integer touserbasicid) {
		this.touserbasicid = touserbasicid;
	}
	
	@Column(length=200)
	public String getContent() {
		return content;
	}
	public void setContent(String content) {
		this.content = content;
	}
	
	@Column
	public boolean getIsreaded() {
		return isreaded;
	}
	public void setIsreaded(boolean isreaded) {
		this.isreaded = isreaded;
	}
	
	@Column(length=50)
	public String getTime() {
		return time;
	}
	public void setTime(String time) {
		this.time = time;
	}
	
	@Column
	public Integer getMessagebasicid() {
		return messagebasicid;
	}
	public void setMessagebasicid(Integer messagebasicid) {
		this.messagebasicid = messagebasicid;
	}
}
